#include  <stdio.h>

int fun(int  x)

{ int  n, s1, s2, s3, t;

  n=0;

  t=100;

/**********found**********/

  while(t<=999){

/**********found**********/

    s1=t%10;  s2=(t/10)%10;  s3=t/100;

/**********found**********/

    if(s1+s2+s3==x)

    {  printf("%d ",t);

       n++;

    }

    t++;

  }

  return  n;

}

main()

{ int x=-1;

  while(x<0)

  { printf("Please input(x>0): ");  scanf("%d",&x);  }

  printf("\nThe result is: %d\n",fun(x));

  getchar();

}

